import {BlogList} from '../../entitys/store';
import {mockList} from '../../mockJson/mockBlogList';
import {mockDetail} from '../../mockJson/mockBlogDeails';

const state = {
    mockList,
    mockDetail
    
}   

const getters = {
    getList: (state:BlogList) => state.mockList,
    getBlogDetail: (state:BlogList) => state.mockDetail
}

const mutations = {
    addList: (state:BlogList, item:string) => state.mockList.list.push(item)
}

const actions = {
    addList: ({commit}:any, item:string) => commit('addList', item)
}

export default {
    state,
    getters,
    mutations,
    actions
}


